extends Node2D

export(String) var text = ""
export(String) var pinyin = ""
export(PackedScene) var scene

onready var rich_text = $PinTextLabel

func _ready() -> void:
	rich_text.ptext = text
	rich_text.pinyin = pinyin

	rich_text.play(0.05, 0.1)


func _on_PinTextLabel_play_ended() -> void:
	if scene:
		Globals.load_scene_to(scene)
